﻿using Models;
using Models.DTO;
using System;
using System.Collections.Generic;
using System.Text;

namespace IBLL
{
    /// <summary>
    /// 角色表的接口BLL
    /// </summary>
    public interface IRoleInfoBLL
    {
        /// <summary>
        /// 查询获取角色列表的方法
        /// </summary>
        /// <param name="page">第一页</param>
        /// <param name="limit">每页几条数据</param>
        /// <param name="RoleName">角色名</param>
        /// <param name="count">数据总量</param>
        /// <returns></returns>
        List<GetRoleInfoDTO> GetRoleInfos(int page, int limit, string RoleName, out int count);

        

        /// <summary>
        /// 添加用户的方法
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        bool CreateRoleInfo(RoleInfo entity, out string msg);


        /// <summary>
        /// 用户软删除方法
        /// </summary>
        /// <param name="id">被删除的用户id</param>
        /// <returns></returns>
        bool DeleteRoleInfo(string id);


        /// <summary>
        /// 批量用户软删除方法
        /// </summary>
        /// <param name="id">被删除的用户id集合</param>
        /// <returns></returns>
        bool DeleteRoleInfo(List<string> ids);

        /// <summary>
        /// 更新用户信息方法
        /// -
        /// </summary>
        /// <param name="roleInfo">要更新的实体</param>
        /// <returns></returns>
        bool UpdateRoleInfo(RoleInfo roleInfo, out string msg);

        /// <summary>
        /// 获取已经绑定的用户id集
        /// </summary>
        /// <param name="ids">角色id</param>
        /// <returns></returns>
        List<string> GetBindUserIds(string ids);

        /// <summary>
        /// 获取已经绑定的擦id集
        /// </summary>
        /// <param name="ids">角色id</param>
        /// <returns></returns>
        List<string> GetBindMenuIds(string ids);

        /// <summary>
        /// 绑定用户角色的方法
        /// </summary>
        /// <param name="userIds"></param>
        /// <param name="roleId"></param>
        /// <returns></returns>
        bool BindStaffInfo(List<string> userIds, string roleId);

        /// <summary>
        /// 绑定菜单角色的方法
        /// </summary>
        /// <param name="menuIds"></param>
        /// <param name="roleId"></param>
        /// <returns></returns>
        bool BindMenuInfo(List<string> menuIds, string roleId);
    }
}
